package listbyorder.access101_200.test153;

/**
 * @author code_yc
 * @version 1.0
 * @date 2020/6/13 10:06
 */
public class Solution1 {

    public int findMin(int[] nums) {
        if (nums.length == 1) return nums[0];
        for (int i = 0; i < nums.length - 1; i++) {
            if (nums[i] > nums[i + 1]) {
                return nums[i + 1];
            }
        }
        return nums[0];
    }
}
